added generic error handle
changed session time to 10 minutes