Adds validation for authentication on server;
Re-factors validation on client;

Signed-off-by: ashwinh <ashwinh@cybage.com>