Revamped password reset workflow

Removed redundancies and Java code