login and query works