Fixed bug when log-in