Fixed a bug with first_login