Added spring-security configurations and implement login function