Fixed bug where if user is not logged it, he/she will be logged in twice

@masteinhauser @apitman