Changes for session authentication