[ADD] Separate file for session check and DB connect;