Add response functions, create login function