Added functionality for password recovery.