updated api server.js with checks for user and then returns user info and key