split out database actions for login/signup into seperate functions. signup is working at basic level