login works

also moved away from procedural style coding. future code will be in OOP
style. but login does work. android client was tested receiving valid
json data