code for app LoginHandler. commented out bluetooth code so new tornado server can run. added json example for auth