Bugfix in post_login