Fleshed out the login function a bit more, still need to finish
working on what to do when an exception is thrown.
have exceptions throwing errors, but need to work it so that the response is less dirty