Added login code, doesn't work. app crashes