#29 replace check_session function with check_session decorator