ticket:5 Added tests for invalid data
ticket:5 if (not user is None) - replaced with: if user
ticket:5 Some styles improvements
ticket:5 Common pieces of templates moved to base.html