Login functionality. Also created dialog stuff for async tasks.