adds helper functions and login stuff