Move tests to seperate folder and files.
Fix redirection depending on login backend.