add functioning login_required decorator