diff --git a/web/.idea/workspace.xml b/web/.idea/workspace.xml
index aba975a883774e0998f2882fba3ed1c063e865c3..44a51c9bb850b61be6432f7b86dd3cda9b5c1828 100644
--- a/web/.idea/workspace.xml
+++ b/web/.idea/workspace.xml
@@ -29,7 +29,7 @@
         <entry file="file://$PROJECT_DIR$/warpauthWeb/views/main.py">
           <provider selected="true" editor-type-id="text-editor">
             <state vertical-scroll-proportion="0.0">
-              <caret line="10" column="0" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
+              <caret line="8" column="44" selection-start-line="8" selection-start-column="10" selection-end-line="8" selection-end-column="44" />
               <folding>
                 <element signature="e#0#35#0" expanded="true" />
               </folding>
@@ -74,8 +74,8 @@
       <file leaf-file-name="token_gen.html" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/token_gen.html">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-3.2692308">
-              <caret line="5" column="40" selection-start-line="5" selection-start-column="40" selection-end-line="5" selection-end-column="40" />
+            <state vertical-scroll-proportion="-0.65384614">
+              <caret line="1" column="12" selection-start-line="1" selection-start-column="8" selection-end-line="1" selection-end-column="12" />
               <folding>
                 <element signature="e#674#699#0#HTML" expanded="true" />
               </folding>
@@ -86,8 +86,8 @@
       <file leaf-file-name="login.html" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/login.html">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-0.0">
-              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="15" />
+            <state vertical-scroll-proportion="-3.9230769">
+              <caret line="6" column="73" selection-start-line="1" selection-start-column="0" selection-end-line="6" selection-end-column="73" />
               <folding>
                 <element signature="n#style#0;n#label#1;n#form#0;n#!!top" expanded="true" />
               </folding>
@@ -95,16 +95,28 @@
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="base.html" pinned="false" current-in-tab="true">
+      <file leaf-file-name="base.html" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/base.html">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="1.486014">
+            <state vertical-scroll-proportion="-32.692307">
               <caret line="53" column="88" selection-start-line="53" selection-start-column="88" selection-end-line="53" selection-end-column="88" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
+      <file leaf-file-name="reset_password.py" pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/warpauthWeb/views/reset_password.py">
+          <provider selected="true" editor-type-id="text-editor">
+            <state vertical-scroll-proportion="0.4832776">
+              <caret line="17" column="20" selection-start-line="17" selection-start-column="20" selection-end-line="17" selection-end-column="20" />
+              <folding>
+                <element signature="e#0#35#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
     </leaf>
   </component>
   <component name="FileTemplateManagerImpl">
@@ -124,18 +136,18 @@
         <option value="$PROJECT_DIR$/warpauth/settings.py" />
         <option value="$PROJECT_DIR$/warpauthWeb/models.py" />
         <option value="$PROJECT_DIR$/warpauthWeb/views.py" />
-        <option value="$PROJECT_DIR$/warpauthWeb/views/reset_password.py" />
         <option value="$PROJECT_DIR$/warpauthWeb/views/views.py" />
         <option value="$PROJECT_DIR$/warpauthWeb/urls.py" />
         <option value="$PROJECT_DIR$/warpauthWeb/util.py" />
         <option value="$PROJECT_DIR$/warpauth/urls.py" />
         <option value="$PROJECT_DIR$/warpauthWeb/templates/base.html" />
-        <option value="$PROJECT_DIR$/warpauthWeb/views/main.py" />
         <option value="$PROJECT_DIR$/warpauthWeb/views/login.py" />
         <option value="$PROJECT_DIR$/warpauthWeb/templates/login.html" />
         <option value="$PROJECT_DIR$/warpauthWeb/templates/reset_password/change_password.html" />
         <option value="$PROJECT_DIR$/warpauthWeb/templates/reset_password/token_gen.html" />
         <option value="$PROJECT_DIR$/warpauthWeb/templates/about.html" />
+        <option value="$PROJECT_DIR$/warpauthWeb/views/main.py" />
+        <option value="$PROJECT_DIR$/warpauthWeb/views/reset_password.py" />
       </list>
     </option>
   </component>
@@ -686,16 +698,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/warpauthWeb/views/reset_password.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="0.0">
-          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
-          <folding>
-            <element signature="e#0#35#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/warpauthWeb/__init__.py">
       <provider selected="true" editor-type-id="text-editor">
         <state vertical-scroll-proportion="0.0">
@@ -756,71 +758,81 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/warpauthWeb/views/main.py">
+    <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/change_password.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="0.0">
-          <caret line="10" column="0" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
+        <state vertical-scroll-proportion="-7.1923075">
+          <caret line="11" column="54" selection-start-line="11" selection-start-column="44" selection-end-line="11" selection-end-column="54" />
           <folding>
-            <element signature="e#0#35#0" expanded="true" />
+            <element signature="e#748#773#0#HTML" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/warpauthWeb/views/login.py">
+    <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/token_gen.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="0.0">
-          <caret line="33" column="0" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" />
+        <state vertical-scroll-proportion="-0.65384614">
+          <caret line="1" column="12" selection-start-line="1" selection-start-column="8" selection-end-line="1" selection-end-column="12" />
           <folding>
-            <element signature="e#0#35#0" expanded="true" />
+            <element signature="e#674#699#0#HTML" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/token_gen.html">
+    <entry file="file://$PROJECT_DIR$/warpauthWeb/views/login.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-3.2692308">
-          <caret line="5" column="40" selection-start-line="5" selection-start-column="40" selection-end-line="5" selection-end-column="40" />
+        <state vertical-scroll-proportion="0.0">
+          <caret line="33" column="0" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" />
           <folding>
-            <element signature="e#674#699#0#HTML" expanded="true" />
+            <element signature="e#0#35#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/reset_password/change_password.html">
+    <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/about.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-7.1923075">
-          <caret line="11" column="54" selection-start-line="11" selection-start-column="44" selection-end-line="11" selection-end-column="54" />
-          <folding>
-            <element signature="e#748#773#0#HTML" expanded="true" />
-          </folding>
+        <state vertical-scroll-proportion="-0.65384614">
+          <caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
+          <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/login.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-0.0">
-          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="15" />
+        <state vertical-scroll-proportion="-3.9230769">
+          <caret line="6" column="73" selection-start-line="1" selection-start-column="0" selection-end-line="6" selection-end-column="73" />
           <folding>
             <element signature="n#style#0;n#label#1;n#form#0;n#!!top" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/about.html">
+    <entry file="file://$PROJECT_DIR$/warpauthWeb/views/main.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-0.65384614">
-          <caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
-          <folding />
+        <state vertical-scroll-proportion="0.0">
+          <caret line="8" column="44" selection-start-line="8" selection-start-column="10" selection-end-line="8" selection-end-column="44" />
+          <folding>
+            <element signature="e#0#35#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/warpauthWeb/templates/base.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="1.486014">
+        <state vertical-scroll-proportion="-32.692307">
           <caret line="53" column="88" selection-start-line="53" selection-start-column="88" selection-end-line="53" selection-end-column="88" />
           <folding />
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/warpauthWeb/views/reset_password.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state vertical-scroll-proportion="0.4832776">
+          <caret line="17" column="20" selection-start-line="17" selection-start-column="20" selection-end-line="17" selection-end-column="20" />
+          <folding>
+            <element signature="e#0#35#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
   </component>
 </project>
\ No newline at end of file
diff --git a/web/warpauthWeb/views/main.py b/web/warpauthWeb/views/main.py
index 94753e034ef8bcdf21dde5ed547af25f67f1bb33..dc0b69e5592d712191c1e46e794283246cc9c1a4 100644
--- a/web/warpauthWeb/views/main.py
+++ b/web/warpauthWeb/views/main.py
@@ -4,7 +4,6 @@ from django.shortcuts import redirect
 from django.contrib.auth.decorators import login_required
 from warpauthWeb.util import *
 
-
 @login_required(login_url='/login/', redirect_field_name=None)
 def index(request):
     print(request.user.ldap_user.group_names)
diff --git a/web/warpauthWeb/views/reset_password.py b/web/warpauthWeb/views/reset_password.py
index 8fd11a3561b835ed23e3fb23db68784310374144..7bdcdfa2cf8c81553ccd59d977c4f2fb31e2275e 100644
--- a/web/warpauthWeb/views/reset_password.py
+++ b/web/warpauthWeb/views/reset_password.py
@@ -11,7 +11,7 @@ import hashlib
 import logging
 import os
 import datetime
-
+from django.core.exceptions import ObjectDoesNotExist,ValidationError
 
 def gen_token(request):
     logger = logging.getLogger("reset_password")
@@ -23,9 +23,7 @@ def gen_token(request):
                 p.user=usr.uid
                 p.email=usr.email
                 p.hash = hashlib.sha1(os.urandom(128)).hexdigest()
-                print (p.hash)
                 p.save()
-
                 logger.info("Success for %s", usr.uid)
         except Exception as e:
             print(e)