logout view
refactor API auth