Added handler for regestring.
Added features for loggining.