User is now redirected back to api page

User is now redirected back to api page if he login from it
Changed authentication and user session handling

Changed authentication and user session handling and added redirect
after logout
Added key sortcuts to editor