Finish spring security function