added more login infrastructure so we can use ajax instead? also this uses get so the query is literally in the url which is obviously not good for login information