I was having this issue on my first install.
My first issue was that my DNS was all buggered up and in that case nobody could log in.
Can you trace the SQL statements (log_statement = all in postgres) to see if maybe an insert into 'users' is failing?
Also 14f hex = 500 dec, lots of the raise_error() calls use 500 so you could find those and change to 501, 502 or whatever to see which specific error is hitting.
Also in my codebase I've added lots of this stuffs
write_log('trace',print_r($x,true));
I get lots of stuffs in ./logs/trace
Because the system is AJAX based things like
print_r($x);
exit;
don't work cause the response is sent on the side channel, not the main HTTP connection so you'll have to use write_log() to trace. HTH.