Minor/adapt 187
Make changes to authentication and add in process for associating the token to the current domain and then logging out.
Make changes to authentication and add in process for associating the token to the current domain and then logging out.