authentication functionality added to both the forms