Auth timeout

Updated User.authenticate to use a json payload. Also simplifies that code a bit.