added middleware for no cookies; added api functions to login/logout user