Fixed tests. Added test to check redirect to login form if no user logged in.