Implemented the API calls for login/out. Also updated some of the SQL so usernames are case insensitive. User "registration" is done behind the scenes, we probably want this to be a two step process in the future.