POST login implementation and session validation