login script and session handling implemented and working