Fixed issues with authenication redirect
Use FactoryGirl to construct test data.