Added login_required decorator and logout from flask based sessions