Display invalid credentials message inside the primary-tabs div. Added support to submit the form using <Enter>.
Updated code based on comments
Updated basic_auth module to handle templates All the auth modules depends on CMS_AUTHENTICATION_MODULE Send mail is done using features from CMS_AUTHENTICATION_MODULE. Update redirect in roc_auth.js after success login to home.