Fixed a bug with login