Fixed login button functionality