Fixed login redirecting to null