Authentication and session functionality added