Logging in works as intended now

Fix faulty encoding of login data
Add app-token saving
Fix login activity not shutting down when back is pressed