Adds login and logout helper functions