Create separate file for functions
check if session variable exists