Edits to OAUth protocol and db connection