Finished up Authentication logic.

All done with Authentication