moved check_mail function into views.py