improved login with openID/facebook dialog handling, fixes #1