Sorta fixed login but still crashing when leaving main UI.  Probably the API

#400