login and logout API resources + tests