Changed a lot of code in LoginActivity