Fixed bug when login did't retrieve the user