Using generic abort calls instead of customized ones inside the "login_required" decorator.
login_required decorator extracted to its own file.