Fixed user login when registered